print(sort_ip)
while True:
    guest_name = input("请输入你的名字:")
    if guest_name == "":
        print("请不要输入空值")
        continue
    else:
        with open("guest.txt", "a+", encoding="utf-8") as f:
            f.write(guest_name+"已登记"+'\n')
            print("你已成功登记")
            break
